package com.qyt.hotel.service.impl;

import com.qyt.hotel.dao.RoomImgMapper;
import com.qyt.hotel.entity.RoomImg;
import com.qyt.hotel.service.RoomImgService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoomImgServiceImpl implements RoomImgService {

    @Resource
    private RoomImgMapper roomImgMapper;

    @Override
    public List<RoomImg> getRoomImgList(String roomId) {
        return roomImgMapper.getRoomImgList(roomId);
    }

    @Override
    public Integer addRoomImg(String roomId, String roomImgName) {
        return roomImgMapper.addRoomImg(roomId, roomImgName);
    }

    @Override
    public Integer deleteRoomImg(Integer roomImgId) {
        return roomImgMapper.deleteRoomImg(roomImgId);
    }

    @Override
    public String getRoomImgId(String roomImgName) {
        return roomImgMapper.getRoomImgId(roomImgName);
    }
}
